 #{extends 'frameHome.html' /} #{set title:'OrganizationIdeas' /}#{set 'moreStyles'}
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}">
#{/set}

<script type="text/javascript" src="@{'/public/javascripts/changePriority.js'}">
</script>

<script type="text/javascript">
	$(document).ready(
			function() {
				$('.left, .content input, .content textarea, .content select')
						.focus(function() {
							$(this).parents('.row').addClass("over");
						}).blur(function() {
							$(this).parents('.row').removeClass("over");
						});
			});
</script>

<div id=right>

	<script type="text/javascript">
		function createTarget(t) {
			window.open("", t, "width=600,height=550");
			return true;
		}
	</script>

	<head>
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/main.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}">

	</head>
	<div id=main>

		<div id="Organization-Ideas">
			<h1>
				<b>Organization Ideas</b>
			</h1>
			<form action="@{PostingIdea.selectAllIdeas() }">
				#{if listIdea}#{list items:listIdea, as:'idea'} #{if idea.hide==false}
				<li><a href="@{PostingIdea.ShowIdea(idea.id)}"><input
						type="checkbox" name="box" value=${idea} />${idea.title}</a> ...
					Posted By: ${idea.author.name} #{if !isIdeaDeveloper} 
					#{if idea.priority == "High"} 
					<select
					ONCHANGE="javascript: opt(${idea.id},this.options[this.selectedIndex].value);">
						<option id="h_option" selected="selected">High</option>
						<option id="m_option">Intermediate</option>
						<option id="l_option">Low</option>
				</select><br /> #{/if} #{if idea.priority == "Intermediate"} <select
					ONCHANGE="javascript: opt(${idea.id},this.options[this.selectedIndex].value);">
						<option id="h_option">High</option>
						<option id="m_option" selected="selected">Intermediate</option>
						<option id="l_option">Low</option>
				</select><br /> #{/if} #{if idea.priority == "Low"} <select
					ONCHANGE="javascript: opt(${idea.id},this.options[this.selectedIndex].value);">
						<option id="h_option">High</option>
						<option id="m_option">Intermediate</option>
						<option id="l_option" selected="selected">Low</option>
				</select>#{/if}<br /> #{/if}</li>#{/if}#{/list} <a
					href="@{PostingIdea.PostToOrganization(organization.id)}"
					class="pill button">Post idea to Organization</a></br> </br>#{if merger.email==organization.lead.email} #{if size>1} <input
					type="submit" value="Submit Merged Ideas" onclick="JavaScript:alert('are you sure you want to merge selected one??!')" />#{/if} #{/if} #{/if}
				#{else} Sorry! This Organization has no Ideas <br>
				<a href="@{PostingIdea.PostToOrganization(organization.id)}"
					class="pill button">Post idea to Organization</a></br> #{/else}


			</form>
			


		</div>
	</div>
	</html>